package com.uranus.auth.auth.controller;


import com.uranus.auth.auth.request.captcha.SendCaptchaRequest;
import com.uranus.auth.auth.request.user.CreateUserRequest;
import com.uranus.auth.auth.service.CaptchaService;
import com.uranus.common.VO.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author ybx
 * @since 2018-12-24
 */
@RestController
@RequestMapping("/captcha")
@Api(value = "验证码服务",tags = "短信和邮箱验证")
public class CaptchaController {
    @Autowired
    private CaptchaService captchaService;

    @PostMapping()
    @ApiOperation(value = "发送验证码")
    public Result createCaptcha(@RequestBody SendCaptchaRequest req) {
        return captchaService.createCaptcha(req);
    }

}
